
/*
 * PreguntaPanel.java
 *
 * Created on 12-mar-2012, 0:24:07
 */

package eOlympics;

/**
 *
 * @author Juan Carlos
 */
public class RespuestaPanel extends javax.swing.JPanel {

    /** Creates new form PreguntaPanel */
    public RespuestaPanel() {
        initComponents();
        this.buttonGroup1.add(this.jRadio1);
        this.buttonGroup1.add(this.jRadio2);
        this.buttonGroup1.add(this.jRadio3);
        this.buttonGroup1.add(this.jRadio4);
        this.buttonGroup1.add(this.jRadio0);
    }

    private int m_numRespuesta = 0;

    public int getNumRespuesta() {
        return m_numRespuesta;
    }

    public void setNumRespuesta(int n) {
        m_numRespuesta = n;
        this.jLabel1.setText("Respuesta " + n);
    }

    public String getValorRespuesta() {
       // ButtonMode bm = this.buttonGroup1.getSelection();
        // TODO
        return "X";
    }
    
     public void setValorRespuesta(String s) {
       // ButtonMode bm = this.buttonGroup1.getSelection();
        // TODO modificar los radio buttons
       
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        jRadio1 = new javax.swing.JRadioButton();
        jRadio2 = new javax.swing.JRadioButton();
        jRadio3 = new javax.swing.JRadioButton();
        jRadio4 = new javax.swing.JRadioButton();
        jRadio0 = new javax.swing.JRadioButton();

        jLabel1.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N
        jLabel1.setText("Pregunta X");
        jLabel1.setMaximumSize(new java.awt.Dimension(120, 18));
        jLabel1.setMinimumSize(new java.awt.Dimension(120, 18));
        jLabel1.setName("jLabel1"); // NOI18N
        jLabel1.setPreferredSize(new java.awt.Dimension(120, 18));
        add(jLabel1);

        jRadio1.setFont(new java.awt.Font("Verdana", 0, 14));
        jRadio1.setText("A");
        jRadio1.setName("jRadio1"); // NOI18N
        add(jRadio1);

        jRadio2.setFont(new java.awt.Font("Verdana", 0, 14));
        jRadio2.setText("B");
        jRadio2.setName("jRadio2"); // NOI18N
        add(jRadio2);

        jRadio3.setFont(new java.awt.Font("Verdana", 0, 14));
        jRadio3.setText("C");
        jRadio3.setName("jRadio3"); // NOI18N
        add(jRadio3);

        jRadio4.setFont(new java.awt.Font("Verdana", 0, 14));
        jRadio4.setText("D");
        jRadio4.setName("jRadio4"); // NOI18N
        add(jRadio4);

        jRadio0.setFont(new java.awt.Font("Tahoma", 2, 14));
        jRadio0.setSelected(true);
        jRadio0.setText("en blanco");
        jRadio0.setName("jRadio0"); // NOI18N
        add(jRadio0);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JRadioButton jRadio0;
    private javax.swing.JRadioButton jRadio1;
    private javax.swing.JRadioButton jRadio2;
    private javax.swing.JRadioButton jRadio3;
    private javax.swing.JRadioButton jRadio4;
    // End of variables declaration//GEN-END:variables

}
